/**
预约管理
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
//  查询线索信息
export const queryorderManage = params => axios.get(`${SERVER.CYXDMS_CLUE}/appoint/getAppoints`, { params });
//取消预约
export const cancelAppoint = actionId => axios.post(`${SERVER.CYXDMS_CLUE}/appoint/cancelAppoint?actionId=${actionId}`);

// 修改
export const updateAppointInfo = (actionId,appointTime) => axios.post(`${SERVER.CYXDMS_CLUE}/appoint/updateAppointInfo?actionId=${actionId}&appointTime=${appointTime}`);

//保存
export const saveReceptionist = params => axios.post(`${SERVER.CYXDMS_CLUE}/receptionist/saveReceptionist`,params);

//查询展厅顾问
export const getConsultant = params => axios.get(`${SERVER.CYXDMS_CLUE}/appoint/getConsultant`);

//预约信息导出
export const exportAppointmentExcel = params => {
    params = Object.assign(params,{menuId:'-1'});
    return axios({
        url:`${SERVER.CYXDMS_CLUE}/appoint/export/excel`,
        method:'get',
        params:params,
        responseType: 'blob',
        //10分钟
        timeout:(10*1000)*60
    });
};

//  查询接触记录
// export const queryContactRecord = id => axios.get(`${SERVER.CYXDMS_CLUE}/potenCus/queryContactRecordList/?customerBusinessId=${id}`,);
// //  新增线索潜客
// export const addNewLeads = params => axios.post(`${SERVER.CYXDMS_CLUE}/potenCus/insertPotenCus`, params);
// //  战败车型跳转编辑页面
// export const getFailModelsById = id => axios.get(`${SERVER.CYXDMS_CLUE}/basedata/failModels/${id}`, { id: Number(id) });
// //  战败车型编辑保存
// export const ModifyFailModels = ( params, id) => axios.put(`${SERVER.CYXDMS_CLUE}/basedata/failModels/${id}`, params );
